<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>修改退费</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="修改,退费">
	<meta http-equiv="description" content="This is my page">

  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'退费管理'},{'name':'交费情况'},{'name':'修改退费'}]"/>
    			<jsp:param name="width" value="40%"/>
    		</jsp:include>
    		
    		<s:hidden id="refundId" name="refund.id"></s:hidden>
    		
    		<table cellspacing="1" cellpadding="3" width="70%" bgcolor="#CCCCCC">
				<tr bgcolor="#FFFFFF">
					<td align="right" width="12%" class="label">
						学童姓名：
					</td>
					<td align="left" width="21%">
						<s:property value="refund.child.childName"/>
					</td>
					<td align="right" width="12%" class="label">
						所属班级：
					</td>
					<td align="left" width="21%">
						<s:property value="refund.cla.className"/>
					</td>
					<td align="right" width="12%" class="label">
						退费日期：
					</td>
					<td align="left" width="22%">
						<s:date name="refund.refundDate" format="yyyy-MM-dd"/>
					</td>
				</tr>
				<tr bgcolor="#FFFFFF">
					<td align="right" class="label">
						退款人：
					</td>
					<td align="left" colspan="2">
						<s:property value="refund.refundMan" />
					</td>
					<td align="right" class="label">
						退款单位：
					</td>
					<td align="left" colspan="2">
						<s:property value="refund.unitName" />
					</td>
				</tr>
				<tr bgcolor="#FFFFFF">
					<td align="right" class="label">
						备注：
						<br>
    					<font color="red">(40字以内)</font>
					</td>
					<td align="left" colspan="5">
						<s:textarea name="refund.remark" id="remark" cssStyle="width:98%; height:120px;"></s:textarea>
					</td>
				</tr>
			</table>
			
			<table width="100%" cellspacing="0">
    			<tr>
    				<td align="center" valign="bottom" height="30">
    					<my:hasPermission privilegeId="updateRefund">
    					<input type="button" value="修改" class="btn" onclick="updateRefund()" />
    					</my:hasPermission>
    					<input type="button" value="打印" class="btn" onclick="printRefund()" />
    				</td>
    			</tr>
    		</table>
    		
    		<iframe frameborder="0"
			 scrolling="no"
			 width="70%"
			 id="detailFrame" 
			 name="detailFrame"
			 src="${CONTEXT_PATH}/inner/charge/refundDetailManage.action?rvo.refund.id=<s:property value='refund.id' />"
			 ></iframe>
    		
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function updateRefund()
    {
    	var remark = $('#remark');
        if(remark.val().length > 40)
        {
			showMsg('备注不能超过40字。', function(){
				remark.focus();
			});
			return;
        }
        var url = 'inner/charge/updateRefund.action';
		ajaxAction(url, 'post', 'frm', false, function(){
		});
    }

    function printRefund()
    {
    	var rid = $('#refundId');
    	var url = realPath + '/inner/charge/toPrintRefund.action?refund.id='+ rid.val();
    	openWin(url, 1200, 800, 'yes', 'yes');
    }
    </script>
  </body>
</html>
